<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FACCH管理</title>
<%
	// 权限验证
	if(session.getAttribute("currentMemberShip")==null){
		response.sendRedirect("login.jsp");
		return;
	}
%>
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/themes/icon.css">
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/static/jquery-easyui-1.3.5/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript">

	function searchFACCH(){
		var frontProcessorId = $("#frontProcessorId").combobox("getText").replace("请选择前置机号...","");
		/* var startTime=$("#i1").datebox("getValue");
		var endTime=$("#i2").datebox("getValue");
		var IMSI = $("#IMSI").combobox("getText").replace("请选择IMSI...","");
		var MSISDN = $("#MSISDN").combobox("getText").replace("请选择MSISDN...","");
		var CTCS_ID = $("#CTCS_ID").combobox("getText").replace("请选择机车号...","");
		var UmType = $("#UmType").combobox("getText").replace("请选择Um接口信令类型...",""); */
		var district = $("#district").combobox("getText").replace("请选择小区...","");
		 
		//var frontProcessorId = $("#frontProcessorId").val();
		var startTime=$("#i1").datebox("getValue");
		var endTime=$("#i2").datebox("getValue");
		var IMSI = $("#IMSI").val();
		var MSISDN = $("#MSISDN").val();
		var CTCS_ID = $("#CTCS_ID").val();
		var UmType = $("#UmType").val();
		//var district = $("#district").val();
		
		
		var kilometerStartLong=$("#kilometerStart").val();
		var kilometerEndLong=$("#kilometerEnd").val();
		startDate = new Date(startTime.replace(new RegExp("-","gm"),"/"));
		endDate = new Date(endTime.replace(new RegExp("-","gm"),"/"));
		var startTimeLong = startDate.getTime();
		var endTimeLong = endDate.getTime();
		console.log("startTime: " + startTime);
		//System.out.println("startTime");
		/* console.log("startDate:" + startDate);
		console.log("startDate2:" + startTime.replace(new RegExp("-","gm"),"/"));
		console.log("endDate.getFullYear():" + endDate.getFullYear());
		console.log("endDate.getMonth():" + endDate.getMonth());
		console.log("endDate.getDate():" + endDate.getDate());
		console.log("startTimeLong:" + startTimeLong); */
		 if(startTimeLong-endTimeLong>0){
			 $.messager.alert("系统提示","查询开始时间"+startTime+"不能大于结束时间"+endTime+"！");
			 return;
		 }
		 /* if(endTimeLong-startTimeLong>24*60*60*1000){
			 $.messager.alert("系统提示","查询时间间隔不能大于24小时！");
			 return;
		 } */
		 /* if(endDate.getFullYear()!=startDate.getFullYear()
				 ||(endDate.getMonth()+1)!=(startDate.getMonth()+1)
				 ||endDate.getDate()!=startDate.getDate()){
			 $.messager.alert("系统提示","查询开始时间和结束时间必须在同一天内！");
			 return;
		 } */
		 if(kilometerStartLong-kilometerEndLong>0){
			 $.messager.alert("系统提示","公里标下限值"+kilometerStartLong+"不能大于公里标上限值"+kilometerEndLong+"！");
			 return;
		 }
		 $("#dg").datagrid('load',{
			"frontProcessorId":frontProcessorId,
		 	"startTime":startTimeLong,
		 	"endTime":endTimeLong,
		 	"IMSI":IMSI,
		 	"MSISDN":MSISDN,
		 	"CTCS_ID":CTCS_ID,
		 	"UmType":UmType,
		 	"district":district,
		 	"kilometerStart":kilometerStartLong,
		 	"kilometerEnd":kilometerEndLong,
		 	"search":'1'
		 });
	}
	
	function openFACCHAddDialog(){
		 $("#dlg").dialog("open").dialog("setTitle","添加FACCH信息");
		 $("#flag").val(1);
		 $("#primaryKey").attr("readonly",false);
	}
	
	function openFACCHModifyDialog(){
		 var selectedRows=$("#dg").datagrid("getSelections");
		 if(selectedRows.length!=1){
			 $.messager.alert("系统提示","请选择一条要编辑的数据！");
			 return;
		 }
		 var row=selectedRows[0];
		 $("#dlg").dialog("open").dialog("setTitle","编辑FACCH信息");
		 $("#fm").form("load",row);
		 $("#flag").val(2);
		 $("#id").attr("readonly",true);
	}
	
	function save(){
		$("#fm").form("submit",{
			url:"${pageContext.request.contextPath}/facch/save.do",
			onSubmit:function(){
				return $(this).form("validate");
			},
			success:function(result){
				var result=eval('('+result+')');
				if(result.success){
					$.messager.alert("系统提示","保存成功！");
					resetValue();
					$("#dlg").dialog("close");
					$("#dg").datagrid("reload");
				}else{
					$.messager.alert("系统提示","保存失败！");
					return;
				}
			}
		 });
	}
	
	function checkData(){
		var flag=$("#flag").val();
		if(flag==1){
			$.post("${pageContext.request.contextPath}/facch/exisPrimaryKey.do",{primaryKey:$("#primaryKey").val()},function(result){
				if(result.exist){
					 $.messager.alert("系统提示","该PrimaryKey已存在，请更换下！");
					 $("#primaryKey").focus();
				}else{
					save();
				}
			},"json");
		}else{
			save();
		}
	}
	
	function resetValue(){
		 $("#primaryKey").val("");
		 $("#timeStamp").val("");
		 $("#startTime").val("");
		 $("#frontProcessorId").val("");
		 $("#recordId").val("");
		 $("#IMSI").val("");
		 $("#logicChannel").val("");
		 $("#MSISDN").val("");
		 $("#direction").val("");
		 $("#frameNumber").val("");
		 $("#siteName").val("");
		 $("#decode").val("");
		 $("#rawMessage").val("");
		 $("#kilometer").val("");
		 $("#speed").val("");
		 $("#CI").val("");
		 $("#LAC").val("");
		 $("#CTCS_ID").val("");
		 $("#ENGINE_ID").val("");
		 $("#MS_TYPE").val("");
		 $("#message_TYPE").val("");
		 $("#sourceData").val("");
		 $("#s_ARFCN").val("");
		 $("#t_BSIC").val("");
		 $("#t_BCCH").val("");
		 $("#t_ARFCN").val("");
		 $("#HO_Reference").val("");
		 $("#TA").val("");
		 $("#timeSlot").val("");
		 $("#TMSI").val("");
		 $("#channel").val("");
		 $("#TCH").val("");
		 $("#IMEI").val("");
		 $("#l2").val("");
		 $("#dataLength").val("");
		 $("#LRBG").val("");
		 $("#CRC_ECC").val("");
		 $("#t_Train").val("");
	}
	
	function closeDialog(){
		 $("#dlg").dialog("close");
		 resetValue();
	}
	
	function deleteFACCH(){
		 var selectedRows=$("#dg").datagrid("getSelections");
		 if(selectedRows.length==0){
			 $.messager.alert("系统提示","请选择要删除的数据！");
			 return;
		 }
		 var strIds=[];
		 for(var i=0;i<selectedRows.length;i++){
			 strIds.push(selectedRows[i].primaryKey);
		 }
		 var ids=strIds.join(",");
		 $.messager.confirm("系统提示","您确定要删除这<font color=red>"+selectedRows.length+"</font>条数据吗？",function(r){
			if(r){
				$.post("${pageContext.request.contextPath}/facch/delete.do",{primaryKeys:ids},function(result){
					if(result.success){
						 $.messager.alert("系统提示","数据已成功删除！");
						 $("#dg").datagrid("reload");
					}else{
						$.messager.alert("系统提示","数据删除失败，请联系系统管理员！");
					}
				},"json");
			} 
		 });
	}
	
	function exportFACCHInCurrentPage(){
		var rows = $("#dg").datagrid("getRows");
		if(rows.length==0){
			 $.messager.alert("系统提示","请先查询出数据！");
			 return;
		 }
		 var strIds=[];
		 for(var i=0;i<rows.length;i++){
			 strIds.push(rows[i].primaryKey);
		 }
		 var ids=strIds.join(",");
		 window.open('${pageContext.request.contextPath}/facch/export.do?ids='+ids+'');
	}
	function exportByTemplateInCurrentPage(){
		var rows = $("#dg").datagrid("getRows");
		var strIds=[];
		 for(var i=0;i<rows.length;i++){
			 strIds.push(rows[i].primaryKey);
		 }
		 var ids=strIds.join(",");
		 window.open('${pageContext.request.contextPath}/facch/exportByTemplate.do?ids='+ids+'');
	}
	
	function exportFACCHInAllPages(){
		 window.open('${pageContext.request.contextPath}/facch/export.do?ids='+null+'');
	}
	
	function exportByTemplateInAllPages(){
		 window.open('${pageContext.request.contextPath}/facch/exportByTemplate.do?ids='+null+'');
	}
	
	function openUploadFileDialog(){
		$("#dlg2").dialog('open').dialog('setTitle','批量导入数据');
	}
	
	function downloadTemplate(){
		window.open('template/facchExportTemplate.xls');
	}
	
	function uploadFile(){
		$("#uploadForm").form("submit",{
			success:function(result){
				var result=eval('('+result+')');
				if(result.errorMsg){
					$.messager.alert("系统提示",result.errorMsg);
				}else{
					$.messager.alert("系统提示","上传成功");
					$("#dlg2").dialog("close");
					$("#dg").datagrid("reload");
				}
			}
		});
	}
	
	function formatDatebox(value) {
		var datetimeType = "";
	    var date =new Date(parseInt(value));
	    datetimeType = date.getFullYear()+"-"+(date.getMonth()+1)+"-"+date.getDate()
	    +" "+date.getHours()+":"+date.getMinutes()+":"+date.getSeconds()+" "+date.getMilliseconds();
	    
	    return datetimeType;
	}
	
	function formatRawMessage(value) {
		return JSON.stringify(value);
	}
	
	function formatDirection(value) {
		if(value==0){
			return "上行";
		}else{
			return "下行";
		}
	}
	
	function formatLogicChannel(value) {
		if(value==0){
			return "FrequencySpectrum";
		}else if(value==1){
			return "SDCCH";
		}else if(value==2){
			return "SACCH";
		}else if(value==3){
			return "TCH";
		}else if(value==4){
			return "SACCH_WITH_TCH";
		}else if(value==5){
			return "FACCH";
		}else if(value==7){
            return "BCCH";
        }
        else if(value==8){
            return "AGCH";
        }
		else{
			return value;
		}
	}
	$(function(){
		var p = $('#dg').datagrid('getPager');
	    $(p).pagination({ //设置分页功能栏
	           //分页功能可以通过Pagination的事件调用后台分页功能来实现
	            //layout:['prev','next'],
                layout:['list','sep','first','prev','sep','manual','sep','next','sep','refresh'],
	        	beforePageText:"第",
	            afterPageText:"页",
	            displayMsg:""                  
	    });
	}
	);

	$('#i1').datetimebox('textbox').bind('focus', function(e) {
		alert(1);
		if(null == $('#i1').datetimebox('getValue')){
			alert(1);
		}
	})
</script>

</head>
<body style="margin: 1px">
	
<table id="dg" title="FACCH管理" class="easyui-datagrid"
   fitColumns="fasle" pagination="true" rownumbers="true" pageSize="100" pageList="[100,200,300,400,500]" 
   url="${pageContext.request.contextPath}/facch/list.do" fit="true" toolbar="#tb">
   <thead>
   	<tr>
   		<th field="cb" checkbox="true" align="center"></th>
   		<th field="primaryKey" width="80" align="center">主键</th>
   		<th field="timeStamp"  width="80" align="center" formatter="formatDatebox">文件入库时间</th>
   		<th field="startTime" width="80" align="center" formatter="formatDatebox">文件生成时间</th>
   		<th field="frontProcessorId" width="80" align="center">前置机号</th>
   		<th field="recordId" width="80" align="center">记录号</th>
   		<th field="IMSI" width="80" align="center">IMSI</th>
   		<th field="logicChannel" width="80" align="center" formatter="formatLogicChannel">LogicChannel</th>
   		<th field="MSISDN" width="80" align="center">MSISDN</th>
   		<th field="direction" width="80" align="center" formatter="formatDirection">方向</th>
   		<th field="frameNumber" width="80" align="center">FrameNumber</th>
   		<th field="siteName" width="80" align="center">小区号</th>
   		<th field="decode" width="80" align="center">Decode</th>
   		<th field="rawMessage" width="80" align="center" formatter="formatRawMessage">源信息</th>
   		<th field="kilometer" width="80" align="center">公里标</th>
   		<th field="speed" width="80" align="center">速度（km/h）</th>
   		<th field="CI" width="80" align="center">CI</th>
   		<th field="LAC" width="80" align="center">LAC</th>
   		<th field="CTCS_ID" width="80" align="center">机车号</th>
   		<th field="ENGINE_ID" width="80" align="center">ENGINE_ID</th>
   		<th field="MS_TYPE" width="80" align="center">MS_TYPE</th>
   		<th field="message_TYPE" width="80" align="center">Um接口信令类型</th>
   		<th field="sourceData" width="80" align="center">SourceData</th>
   		<th field="s_ARFCN" width="80" align="center">S_ARFCN</th>
   		<th field="t_BSIC" width="80" align="center">T_BSIC</th>
   		<th field="t_BCCH" width="80" align="center">T_BCCH</th>
   		<th field="t_ARFCN" width="80" align="center">T_ARFCN</th>
   		<th field="HO_Reference" width="80" align="center">HO_Reference</th>
   		<th field="TA" width="80" align="center">TA</th>
   		<th field="timeSlot" width="80" align="center">TimeSlot</th>
   		<th field="TMSI" width="80" align="center">TMSI</th>
   		<th field="channel" width="80" align="center">Channel</th>
   		<th field="TCH" width="80" align="center">TCH</th>
   		<th field="IMEI" width="80" align="center">IMEI</th>
   		<th field="l2" width="80" align="center">L2</th>
   		<th field="dataLength" width="80" align="center">DataLength</th>
   		<th field="LRBG" width="80" align="center">LRBG</th>
   		<th field="CRC_ECC" width="80" align="center">CRC_ECC</th>
   		<th field="t_Train" width="80" align="center">T_Train</th>
   	</tr>
   </thead>
 </table>
 <div id="tb">
 	<div>
 	 <%--  <c:if test="${currentMemberShip.group.name=='管理员' }">
 		<a href="javascript:openFACCHAddDialog()" class="easyui-linkbutton" iconCls="icon-add" plain="true">添加</a>
 		<a href="javascript:openFACCHModifyDialog()" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改</a>
 		<a href="javascript:deleteFACCH()" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除</a>
      </c:if> --%>
 		<a href="javascript:exportFACCHInCurrentPage()" class="easyui-linkbutton" iconCls="icon-save" plain="true">导出当前FACCH</a>
 		<a href="javascript:exportFACCHInAllPages()" class="easyui-linkbutton" iconCls="icon-save" plain="true">导出所有FACCH</a>
 		<a href="javascript:exportByTemplateInCurrentPage()" class="easyui-linkbutton" iconCls="icon-save" plain="true">用模版导出当前FACCH</a>
 		<a href="javascript:exportByTemplateInAllPages()" class="easyui-linkbutton" iconCls="icon-save" plain="true">用模版导出所有FACCH</a>
      <%-- <c:if test="${currentMemberShip.group.name=='管理员' }">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-import" plain="true" onclick="openUploadFileDialog()">用模版批量导入数据</a>
 	  </c:if> --%>
 	</div>
 	<div>
 		<%-- &nbsp;小区：&nbsp;<input class="easyui-combobox" size="10" id="district" name="district" data-options="panelHeight:'130',valueField:'siteName',textField:'siteName',url:'${pageContext.request.contextPath}/facch/facchDistrictComboList.do'" value="请选择小区..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		&nbsp;前置机号：&nbsp;<input class="easyui-combobox" size="15" id="frontProcessorId" name="frontProcessorId" data-options="panelHeight:'130',valueField:'frontProcessorId',textField:'frontProcessorId',url:'${pageContext.request.contextPath}/facch/facchFrontProcessorIdComboList.do'" value="请选择前置机号..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		&nbsp;时间：&nbsp;<input type="text" id="i1" size="20" class="easyui-datetimebox" style="width:150px" />&nbsp;至&nbsp;
		<input type="text" id="i2" size="20" class="easyui-datetimebox"  style="width:150px" />
 		&nbsp;IMSI：&nbsp;<input class="easyui-combobox" size="15" id="IMSI" name="IMSI" data-options="panelHeight:'130',valueField:'IMSI',textField:'IMSI',url:'${pageContext.request.contextPath}/facch/facchIMSIComboList.do'" value="请选择IMSI..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
		&nbsp;MSISDN：&nbsp;<input class="easyui-combobox" size="15" id="MSISDN" name="MSISDN" data-options="panelHeight:'130',valueField:'MSISDN',textField:'MSISDN',url:'${pageContext.request.contextPath}/facch/facchMSISDNComboList.do'" value="请选择MSISDN..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
		&nbsp;机车号：&nbsp;<input class="easyui-combobox" size="15" id="CTCS_ID" name="CTCS_ID" data-options="panelHeight:'130',valueField:'CTCS_ID',textField:'CTCS_ID',url:'${pageContext.request.contextPath}/facch/facchCTCS_IDComboList.do'" value="请选择机车号..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
		&nbsp;Um接口信令类型：&nbsp;<input class="easyui-combobox" size="25" id="UmType" name="UmType" data-options="panelHeight:'130',valueField:'message_TYPE',textField:'message_TYPE',url:'${pageContext.request.contextPath}/facch/facchMessage_TYPEComboList.do'" value="请选择Um接口信令类型..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		 --%>
 		<!-- &nbsp;小区：&nbsp;<input type="text" size="20" id="district" name="district"  onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		&nbsp;前置机号：&nbsp;<input type="text" size="20" id="frontProcessorId" name="frontProcessorId"   onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		 -->
 		&nbsp;小区：&nbsp;<input class="easyui-combobox" size="15" id="district" name="district" data-options="panelHeight:'130',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/facch/facchDistrictComboList.do'" value="请选择小区..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		&nbsp;前置机号：&nbsp;<input class="easyui-combobox" size="15" id="frontProcessorId" name="frontProcessorId" data-options="panelHeight:'130',valueField:'id',textField:'name',url:'${pageContext.request.contextPath}/facch/facchFrontProcessorIdComboList.do'" value="请选择前置机号..." onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		<input type="checkbox" checked onchange="$('#i1').datetimebox({showSeconds:$(this).is(':checked')})">
 		&nbsp;时间：&nbsp;<input type="text" id="i1" size="20" class="easyui-datetimebox"  data-options="editable:false" style="width:150px"/>&nbsp;至&nbsp;
		<input type="text" id="i2" size="20" class="easyui-datetimebox"  style="width:150px" />
 		&nbsp;IMSI：&nbsp;<input type="text" size="20" id="IMSI" name="IMSI"  onkeydown="if(event.keyCode==13) searchFACCH()"/><br>
		&nbsp;MSISDN：&nbsp;<input type="text" size="20" id="MSISDN" name="MSISDN"  onkeydown="if(event.keyCode==13) searchFACCH()"/>
		&nbsp;机车号：&nbsp;<input type="text" size="20" id="CTCS_ID" name="CTCS_ID"  onkeydown="if(event.keyCode==13) searchFACCH()"/>
		&nbsp;Um接口信令类型：&nbsp;<input type="text" size="20" id="UmType" name="UmType"  onkeydown="if(event.keyCode==13) searchFACCH()"/><br>
 		
 		
 		&nbsp;公里标：&nbsp;k<input type="text" id="kilometerStart" size="20" onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		&nbsp;至&nbsp;
		<input type="text" id="kilometerEnd" size="20" onkeydown="if(event.keyCode==13) searchFACCH()"/>
 		<a href="javascript:searchFACCH()" class="easyui-linkbutton" iconCls="icon-search" plain="true"><b style="font-size:15px">搜索</b></a>
 	</div>
 </div>
 
 <div id="dlg" class="easyui-dialog" style="width:620px;height:250px;padding: 10px 20px"
   closed="true" buttons="#dlg-buttons">
   
   <form id="fm" method="post">
   	<table cellspacing="8px">
   		<tr>
   			<td>primaryKey：</td>
   			<td><input type="text" id="primaryKey" name="primaryKey" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>timeStamp：</td>
   			<td><input type="text" id="timeStamp" name="timeStamp" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>startTime：</td>
   			<td><input type="text" id="startTime" name="startTime" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>frontProcessorId：</td>
   			<td><input type="text" id="frontProcessorId" name="frontProcessorId" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>recordId：</td>
   			<td><input type="text" id="recordId" name="recordId" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>IMSI：</td>
   			<td><input type="text" id="IMSI" name="IMSI" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>logicChannel：</td>
   			<td><input type="text" id="logicChannel" name="logicChannel" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>MSISDN：</td>
   			<td><input type="text" id="MSISDN" name="MSISDN" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>direction：</td>
   			<td><input type="text" id="direction" name="direction" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>frameNumber：</td>
   			<td><input type="text" id="frameNumber" name="frameNumber" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>siteName：</td>
   			<td><input type="text" id="siteName" name="siteName" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>decode：</td>
   			<td><input type="text" id="decode" name="decode" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>rawMessage：</td>
   			<td><input type="text" id="rawMessage" name="rawMessage" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>BCCH：</td>
   			<td><input type="text" id="BCCH" name="BCCH" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>layer：</td>
   			<td><input type="text" id="layer" name="layer" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>length：</td>
   			<td><input type="text" id="length" name="length" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>data：</td>
   			<td><input type="text" id="data" name="data" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>kilometer：</td>
   			<td><input type="text" id="kilometer" name="kilometer" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>speed：</td>
   			<td><input type="text" id="speed" name="speed" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>CI：</td>
   			<td><input type="text" id="CI" name="CI" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>LAC：</td>
   			<td><input type="text" id="LAC" name="LAC" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>CTCS_ID：</td>
   			<td><input type="text" id="CTCS_ID" name="CTCS_ID" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>ENGINE_ID：</td>
   			<td><input type="text" id="ENGINE_ID" name="ENGINE_ID" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>MS_TYPE：</td>
   			<td><input type="text" id="MS_TYPE" name="MS_TYPE" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>message_TYPE：</td>
   			<td><input type="text" id="message_TYPE" name="message_TYPE" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>sourceData：</td>
   			<td><input type="text" id="sourceData" name="sourceData" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>ARFCN：</td>
   			<td><input type="text" id="ARFCN" name="ARFCN" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>RA：</td>
   			<td><input type="text" id="RA" name="RA" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>RF_Capability：</td>
   			<td><input type="text" id="RF_Capability" name="RF_Capability" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>TMSI_IMSI：</td>
   			<td><input type="text" id="TMSI_IMSI" name="TMSI_IMSI" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>call_BCD_Num：</td>
   			<td><input type="text" id="call_BCD_Num" name="call_BCD_Num" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>LU_Type：</td>
   			<td><input type="text" id="LU_Type" name="LU_Type" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>timeSlot：</td>
   			<td><input type="text" id="timeSlot" name="timeSlot" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>TMSI：</td>
   			<td><input type="text" id="TMSI" name="TMSI" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>channel：</td>
   			<td><input type="text" id="channel" name="channel" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>TCH：</td>
   			<td><input type="text" id="TCH" name="TCH" class="easyui-validatebox" required="true"/></td>
   		</tr>
   		<tr>
   			<td>IMEI：</td>
   			<td><input type="text" id="IMEI" name="IMEI" class="easyui-validatebox" required="true"/></td>
   			<td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
   			<td>l2：</td>
   			<td>
   			<input type="text" id="l2" name="l2" class="easyui-validatebox" required="true"/>
   			<input type="hidden" id="flag" name="flag"/>
   			</td>
   		</tr>
   	</table>
   </form>
 </div>
 
 <div id="dlg-buttons">
 	<a href="javascript:checkData()" class="easyui-linkbutton" iconCls="icon-ok">保存</a>
 	<a href="javascript:closeDialog()" class="easyui-linkbutton" iconCls="icon-cancel">关闭</a>
 </div>
 
 <div id="dlg2" class="easyui-dialog" style="width:400px;height:180px;padding:10px 20px"
            closed="true" buttons="#dlg-buttons2">
        <form id="uploadForm" action="${pageContext.request.contextPath}/facch/upload.do" method="post" enctype="multipart/form-data">
        	<table>
        		<tr>
        			<td>下载模版：</td>
        			<td><a href="javascript:void(0)" class="easyui-linkbutton"  onclick="downloadTemplate()">导入模版</a></td>
        		</tr>
        		<tr>
        			<td>上传文件：</td>
        			<td><input type="file" name="facchUploadFile"></td>
        		</tr>
        	</table>
        </form>
	</div>
    
	<div id="dlg-buttons2">
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-ok" onclick="uploadFile()">上传</a>
		<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg2').dialog('close')">关闭</a>
	</div>
	
	
</body>
</html>